package com.whj.ems.entity;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="user",catalog="emsystem")
public class User implements Serializable
{
	private static final long serialVersionUID = 57159803062270836L;
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int uid;
	private String username;
	private String name;
	private String password;
	private String unitname;
	private String telephone;
	private String QQ;
	private String email;
	private String address;
	private String chuanzhen;
	@ManyToOne(cascade=CascadeType.ALL,fetch=FetchType.LAZY)
	@JoinColumn(name="gid")
	private Company company;
	
	public Company getCompany()
	{
		return company;
	}
	public void setCompany(Company company)
	{
		this.company = company;
	}
	public int getUid()
	{
		return uid;
	}
	public void setUid(int uid)
	{
		this.uid = uid;
	}
	public String getUsername()
	{
		return username;
	}
	public void setUsername(String username)
	{
		this.username = username;
	}
	public String getName()
	{
		return name;
	}
	public void setName(String name)
	{
		this.name = name;
	}
	public String getPassword()
	{
		return password;
	}
	public void setPassword(String password)
	{
		this.password = password;
	}
	public String getUnitname()
	{
		return unitname;
	}
	public void setUnitname(String unitname)
	{
		this.unitname = unitname;
	}
	public String getTelephone()
	{
		return telephone;
	}
	public void setTelephone(String telephone)
	{
		this.telephone = telephone;
	}
	public String getQQ()
	{
		return QQ;
	}
	public void setQQ(String qQ)
	{
		QQ = qQ;
	}
	public String getEmail()
	{
		return email;
	}
	public void setEmail(String email)
	{
		this.email = email;
	}
	public String getAddress()
	{
		return address;
	}
	public void setAddress(String address)
	{
		this.address = address;
	}
	public String getChuanzhen()
	{
		return chuanzhen;
	}
	public void setChuanzhen(String chuanzhen)
	{
		this.chuanzhen = chuanzhen;
	}
	
}
